package com.guoxin.concurrentprogramming.chapter4.singleton;

/**
 * @author guoxin
 * @date 2019/7/17
 */
public class LazySingleton {

    private LazySingleton() {
        System.out.println("LazySingleton is create");
    }

    private static LazySingleton instance = null;

    public static synchronized LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }
        return instance;
    }

}
